import request from '@/utils/request'

// 查询已关联属性
export function listByAttrId(query) {
  return request({
    url: '/mall/attrAttrGroup/listByAttrId',
    method: 'get',
    params: query
  })
}

// 查询属性&属性分组关联详细
export function getAttrAttrGroup(id) {
  return request({
    url: '/mall/attrAttrGroup/' + id,
    method: 'get'
  })
}

// 新增属性&属性分组关联
export function addAttrAttrGroup(data) {
  return request({
    url: '/mall/attrAttrGroup',
    method: 'post',
    data: data
  })
}

// 修改属性&属性分组关联
export function updateAttrAttrGroup(data) {
  return request({
    url: '/mall/attrAttrGroup',
    method: 'put',
    data: data
  })
}

// 删除属性&属性分组关联
export function delAttrAttrGroup(id) {
  return request({
    url: '/mall/attrAttrGroup/' + id,
    method: 'delete'
  })
}

// 导出属性&属性分组关联
export function exportAttrAttrGroup(query) {
  return request({
    url: '/mall/attrAttrGroup/export',
    method: 'get',
    params: query
  })
}
